package com.gxa.park.core.commom;

/**
 * 申明一个描述异常类型和消息的枚举
 */
public enum ExceptionCode {

    /**
     * 枚举要先把对象声明好，
     * 访问的时候，只能访问这些提前声明的对象
     */
    SERVER_FAILED("50000","服务器开小差了,请稍后再试"),
    LOGIN_FAILED("50001","登录失败,请检查手机号或密码是否正确"),
    DUPLICATE_PHONE("50002","重复的手机号"),
    DELETE_USER_FAILED("50003","删除失败"),
    SELECT_USER_FAILED("50004","查询失败"),
    UPDATE_USER_FAILED("50005","更新失败"),
    USER_NOT_FOUND("50006","用户不存在，操作失败"),
    EMPTY_TOKEN("50007","token信息为空"),
    WRONG_TOKEN("50008","token校验失败"),
    ADMIN_NO_MATCH("50009","账户密码不匹配"),
    ADMIN_NOT_EXIST("50010","账户不存在"),
    ACCOUNT_SUSPENDEND("50011","账户已被冻结"),
    PHONE_PWD_ISEMTY("50012","手机号或密码为空,请输入正确的手机号或密码"),
    EXPIRE_CODE("50013","验证码失效"),
    WRONG_CODE("50014","验证码错误"),
    WRONG_USER_STATUS("50015","当前用户已被冻结"),
    LOGIN_EXIST("50016","用户已登录"),
    NULL_GOODS_ID("50017","商品信息不存在"),
    ;

    private String code;
    private String message;

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    ExceptionCode(String code, String message) {
        this.code = code;
        this.message = message;
    }

}
